package ch.janotta.slawo.utilities;

public final class ModifiableValue {
  private int startingValue;
  private int currentValue;
  private int maximumValue;

  public ModifiableValue(int aStartingValue) {
    this.startingValue = aStartingValue;
    this.currentValue = aStartingValue;
    this.maximumValue = aStartingValue;
  }

  public int getStartingValue() {
    return startingValue;
  }

  public int getCurrentValue() {
    return currentValue;
  }

  public void setCurrentValue(int currentValue) {
    this.currentValue = currentValue;
    if (currentValue > this.maximumValue) {
      this.maximumValue = currentValue;
    }
  }

  public int getMaximumValue() {
    return maximumValue;
  }

  public void setMaximumValue(int maximumValue) {
    this.maximumValue = maximumValue;
  }

  public String toString() {
    return currentValue + " (" + startingValue + ")";
  }
}
